In some situations, data is copied multiple times within a memory. One approach to making copies of data within a memory is to use repeated operating system (OS) commands to write the same data over and over, to new locations in memory each time. This is inefficient because it involves many read/write operations, the entire copied area of memory has to be read and then written to a new memory area, and the reading and writing is executed in blocks. Further, this requires heavy use of the memory media, and this may impair the endurance (e.g., lifespan) of the memory since some memory technologies provide for limited numbers of write operations before possible memory failures.
Another approach is to use a file system that implements a copy-on-write (CoW) paradigm. Copy-on-write, sometimes referred to as implicit sharing or shadowing, is a resource-management technique used in computer programming to efficiently implement a “duplicate” or “copy” operation on modifiable resources. If a resource is duplicated but not modified, it is not necessary to create a new resource; the resource can be shared between the copy and the original. Modifications must still create a copy, hence the technique: the copy operation is deferred to the first write. By sharing resources in this way, it is possible to significantly reduce the resource consumption of unmodified copies, while adding a small overhead to resource-modifying operations. However, using a file system which implements a CoW paradigm has disadvantages. This approach limits a user of a computing system to a particular file system. It requires additional metadata to be stored on the memory media, it's efficiency depends strongly on a proper hardware configuration and is not transparent to the user.